package com.sihan.framework.etm.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Objects;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class OrgVO implements Serializable {

  private static final long serialVersionUID = 8825168359582703868L;

  @ApiModelProperty(value = "单位Id")
  private String id;

  @ApiModelProperty(value = "机构详情Id")
  private String extendId;

  @ApiModelProperty(value = "单位父Id")
  private String parentId;

  @ApiModelProperty(value = "单位名称")
  private String name;

  @ApiModelProperty(value = "单位编号")
  private String code;

  @ApiModelProperty(value = "是否是部门0:否1:是")
  private Short isDep;

  @ApiModelProperty(value = "单位负责人")
  private String leadUser;

  @ApiModelProperty(value = "负责人手机号")
  private String phone;

  @ApiModelProperty(value = "单位地址")
  private String address;

  @ApiModelProperty(value = "单位描述")
  private String remarks;

  @ApiModelProperty(value = "创建时间")
  private Date createTime;

  @ApiModelProperty(value = "子权限")
  private List<OrgVO> children;

  @ApiModelProperty(value = "班组")
  private String teamName;

  @ApiModelProperty(value = "县")
  private String countryName;

  @ApiModelProperty(value = "地市")
  private String cityName;

  @ApiModelProperty(value = "市县区")
  private String belongOrg;

  public OrgVO(String id) {
    this.id = id;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    OrgVO that = (OrgVO) o;
    return Objects.equals(id, that.id);
  }

  @Override
  public int hashCode() {

    return Objects.hash(id);
  }
}
